<?php
	require('function.php');
	session_start();
	check_valid_user();
	$action=$_REQUEST['action'];
	$title=$_GET['title'];
	$content =  stripslashes($_POST['myEditor']);
	if($content){
		blog_modify($content,$title);
	}
	echo $title;
	$textdata=blog_editdata($title);
	?>
	<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
	<title></title>
    	<script type="text/javascript" charset="utf-8" src="../editor_config.js"></script>
	<script type="text/javascript" charset="utf-8" src="../editor_all.js"></script>
	<link rel="stylesheet" type="text/css" href="../themes/default/ueditor.css"/>
	<style>
        body{
            font-size:14px;
        }
	</style>
	</head>
	<body>
	<form id="form" method="post" action="../blog_modify.php?action=edit&title=<?php echo $title; ?>">
	<script type="text/plain" id="myEditor" name="myEditor"style="width:1000px"><?php echo $textdata; ?></script>
	<p><input type="submit" id="submitInner" value="Submit" /></p><a href=blog_edit.php>Back to List</a>
	</form>
	<script type="text/javascript">
        var editor_a = new baidu.editor.ui.Editor();
        editor_a.render('myEditor');
	</script>
	</body>
	<?php
	
?>
